/**
 * Created by GadflyBSD on 16/3/29.
 */
var myApp = angular.module('ionicApp', ['ui.bootstrap']);

myApp.factory('myService', function($http){
	"use strict";
	var param = {ac: 'angular'};
	return {
		getShopList: function(cid){
			return $http.post('/Business/angular', angular.extend(param, {op: 'getShopList', cid: cid}));
		}
	}
});
myApp.controller('shopListCtrl', function($scope, $log, myService){
	"use strict";
	$scope.showAll = true;
	$scope.showCate = false;
	$scope.link_url = function(cid){
		$scope.showAll = false;
		$scope.showCate = true;
		myService.getShopList(cid).success(function(resp){
			$scope.shopList = resp;
		});
	}
	$scope.link_all = function(){
		$scope.showAll = true;
		$scope.showCate = false;
	}
});